<template>
  <navigator class="" :url="item.url + item.id" open-type="navigate">
    <view class="announce-item">
      <view class="line">
        <Text>{{ item.title.slice(0, 17) }}...-</Text>
        <Text class="time">{{ item.time }}</Text>
      </view>
    </view>
  </navigator>
</template>

<script setup lang="ts">
import type { newsItem } from '@/types/index/home'
import { ref, defineProps } from 'vue'
defineProps<{ item: newsItem }>()
</script>

<style scoped lang="scss">
.announce-item {
  width: 750rpx;
  height: 100rpx;

  box-sizing: border-box;
  line-height: 100rpx;
  font-size: 33rpx;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  .line {
    width: 700rpx;
    height: 100%;
    margin: 0 auto;
    border-bottom: 1rpx solid #dfdddd;

    .time {
      color: #afafaf;
      font-size: 28rpx;
    }
  }
}
</style>
